<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>childNodes.length</title>
</head>
<body>
    <ul id="ul">
        <li></li>
        <li></li>
        <li></li>
    </ul>
    <script>
        var oUl=document.getElementById('ul');
        console.log(oUl.childNodes);//是7不是3
    </script>
</body>
</html>